package com.example;

import de.greenrobot.daogenerator.DaoGenerator;
import de.greenrobot.daogenerator.Entity;
import de.greenrobot.daogenerator.Schema;

public class MyDaoGenerator {
        public static void main(String[] args) throws Exception {
            Schema schema = new Schema(1000, "com.youmingxing.data");
            addNote(schema);
            new DaoGenerator().generateAll(schema, "../app/src/main/java");
        }

        private static void addNote(Schema schema) {
            Entity note = schema.addEntity("MyNews");
            note.addIdProperty();
            note.addIntProperty("u_id");
            note.addStringProperty("nickname");
            note.addStringProperty("headimg");
            note.addIntProperty("type");
            note.addIntProperty("item_id");// 当type=1或2时 改值为作品id；type=3时 海选ID
            note.addStringProperty("content");
            note.addStringProperty("alert");
            note.addStringProperty("thumbnail");
            note.addLongProperty("createtime");
        }
}
